<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>找货</title>
<link type="text/css" href="css/reset.css" rel="stylesheet" />
<link type="text/css" href="css/public.css" rel="stylesheet" />
<link type="text/css" href="css/style.css" rel="stylesheet" />
<link type="text/css" href="css/wode.css" rel="stylesheet" />
<script>
    var deviceWidth = Math.min(640, window.innerWidth)
    document.documentElement.style.fontSize = deviceWidth / 7.5 + "px"
</script>
 <script src="js/jquery-3.0.0.min.js"></script>
<script src="js/core.js"></script>
</head>

<body style="background: #FFFFFF !important;">
	<style>
body{
    overflow:hidden;
}
.tests{
  /*  width:100px;*/
 /*   height:60%;*/
    overflow:auto;
}
.tests2{
	  height:20%;
    overflow:auto;
}

</style>

<!-- top -->
<div class="header">
    <header class="p_header">
        <h1 class="p_dizhi">
        	<a href="1.4.0seach.html" style="width: 88%; margin-right: 10%;" class="top_seach"><img src="images/top_seach.png" />请输入关键词搜索</a>
        </h1>
        <!--<a href="2.0.1xiaoxi.html" class="p_header_right">
            <i class="p_xiaoxi" tilte="">
            	<em>2</em>
            </i>
        </a>-->
    </header>
</div>
<!--找货-->
<div class="zhaohuo">
	<ul class="clearfix">
		<li>
			<a href="8.1.0zhaohuo_tuijian.html">
				<img src="images/chaoliu.png" />
				<h6>潮流推荐</h6>
			</a>
		</li>
		
		<li>
			<a href="8.2.0zhaohuo_rexiao.html">
				<img src="images/rexiao.png"  />
				<h6>热销排行</h6>
			</a>
		</li>
		
		<li>
			<a href="8.3.0wodeshoucang.html">
				<img src="images/shoucang.png" />
				<h6>我的收藏</h6>
			</a>
		</li>
	</ul>
</div>


<div class="relative">
    	<ul class="nav-left tests" style="overflow:auto;" id="sortUl">
        </ul>
        
        <div class="list-right" id="textx2" style="position:absolute; height:500px; overflow:auto">
        <!--上衣-->
        </div>
</div>
<!-- footer -->
<div class="footer">
    <!-- footer -->
    <footer class="clearfix">
        <div class="p_footer" >
            <a href="index.html" id="zhuye">
                <i class="ico_index footer-ico01"></i>
                <span>主页</span>
            </a>
        </div>
        <div class="p_footer" >
            <a href="8.0.0zhaohuo.html" id="zhaohuo" class="p_on">
                <i class="ico_index footer-ico02"></i>
                <span>找货</span>
            </a>
        </div>
        <div class="p_footer" id="fabu"></div>
        <div class="p_footer">
            <a href="9.0.0shangquan.html"  id="shangquan">
                <i class="ico_index footer-ico03"></i>
                <span>商圈</span>
            </a>
        </div>
        <div class="p_footer" id="jiarujinghuoches">
            <a href="11.0.0gouwuche.html">
                <i class="ico_index footer-ico04"></i>
                <span>进货车</span>
            </a>
        </div>
        <div class="p_footer" >
            <a href="buy/12.0.0buy_wode.html" id="wode">
                <i class="ico_index footer-ico05"></i>
                <span>我的</span>
            </a>
        </div>
    </footer>
</div>
</body>

<script>
	$('#textx2').on('scroll',function(){
    // div 滚动了
    alert('滚动了');
    if ($('#textx2').scrollTop() >= (1000-200)) {
        // 滚动到底部了
        alert('滚动到底部了');
    }
});
	//alert(getvl("useryemian"));
 	if(getvl("useryemian")==1){
 	  $("#jiarujinghuoches").html("");
 	    var fabu='<a href="sell/24.2.0fabu_goods.html" onclick="goclicked(this)" class="footer_fabu">'+
                '<img src="images/footer_fabu.png" />'+
            '</a>';
 	  $("#fabu").append(fabu); 
 	  $("#wode").html("");
 	   var wode ='<a href="sell/20.0.0sell_wode.html"  onclick="goclicked(this)">'+
                '<i class="ico_index footer-ico05"></i>'+
                '<span>我的</span>'+
            '</a>';
          $("#wode").append(wode);
          $("#zhaohuo").attr("href","8.0.0zhaohuo.html?useryemian=1");
          $("#shangquan").attr("href","9.0.0shangquan.html?useryemian=1");
          $("#zhuye").attr("href","index.html?useryemian=1");
 	}
 	
</script>
<script>
fenlei();
	 function fenlei(){
	 		$("#sortUl").html("");
	 		 var sun=0;
            $.ajax({
			url: urlcore + "/api/sortType/Primaryclassification?coder=2",
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success:function(data){
           	$.each(data.data.sortTypeList,function(i,n){
           		sun++;
           		 var sortUl="";
           		 if(sun==1){
		     sortUl+='<li  class="active" onclick="TwoclassificationFenlei(this)" name="'+n.id+'"><a>'+n.sortName+'</a></li>'; 
				TwoclassificationFenlei2(n.id,n.sortName);
           		 }else{
		sortUl+='<li class="" onclick="TwoclassificationFenlei(this)" name="'+n.id+'"><a>'+n.sortName+'</a></li>'; 
				 }
      		$("#sortUl").append(sortUl);
           	});
			}, 
			error:function() {
				/* Act on the event*/    //商品类别已完结
				alert("error");
			}
		});
}
	
	
	
		function TwoclassificationFenlei2(str,name){
	 	$("#list-right").html("");
	    $.ajax({
			url: urlcore + "/api/sortType/TwoGoodsAlls?id="+str,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success:function(data){
				var sun=0;
           	var Fenleierji='<div class="zhaohuo_fenlei">'+
                '<div class="list-icon">'+name+'</div>'+
                '<ul class="clearfix">';
                  	$.each(data.data,function(g,h){
                  	
                  		 	 Fenleierji+='<li>'+
                        '<a href="8.1.01zhaohuofenlei.html?id='+h.id+'">'+
                            '<img onerror="errorImg(this)" src="'+h.sortUrl+'" />'+
                            '<h6>'+h.sortName+'</h6>'+
                        '</a>'+
                    '</li>';
                  		 
                  
                   });
                '</ul>'+
            '</div>';
           		$(".list-right").append(Fenleierji);
			}, 
			error:function() {
				/* Act on the event*/    //商品类别已完结
				alert("error");
			}
		});
}

	
	function TwoclassificationFenlei(str){
		var dangqian=$(str).find("a").html();
	   var shi=$(str).attr("name");
	   
	    $("li").each(function () {
            $(this).attr("class","");
             });
	   $(str).attr("class","active");
	   
	 	$(".list-right").html("");
	    $.ajax({
			url: urlcore + "/api/sortType/TwoGoodsAlls?id="+shi,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success:function(data){
				var Fenleierji='<div class="zhaohuo_fenlei">'+
                '<div class="list-icon">'+dangqian+'</div>'+
                '<ul class="clearfix">';
           	$.each(data.data,function(g,h){
       Fenleierji+='<li>'+
                        '<a href="8.1.01zhaohuofenlei.html?id='+h.id+'">'+
                            '<img onerror="errorImg(this)" src="'+h.sortUrl+'" />'+
                            '<h6>'+h.sortName+'</h6>'+
                        '</a>'+
                    '</li>';
           	});
           	 Fenleierji+= '</ul>'+
            '</div>';
           		$(".list-right").append(Fenleierji);
			}, 
			error:function() {
				/* Act on the event*/    //商品类别已完结
				alert("error");
			}
		});
}
</script>
</html>